﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DB_NH.DB_Map.KaoQin
{
    using NHibernate;
    using NHibernate.Mapping.ByCode;
    using NHibernate.Mapping.ByCode.Conformist;

    using DB_NH.DB_Model.KaoQin;

    public class map_kqUser : ClassMapping<kqUser>
    {
        public map_kqUser()
        {
            Property(x => x.dept_name, map =>
            {
                map.Length(40);
            });

            Id(x => x.user_code, map =>
            {
                map.Length(40);
            });

            Property(x => x.user_codex, map =>
            {
                map.Length(40);
            });

            Property(x => x.user_truename, map =>
            {
                map.Length(40);
            });

            ManyToOne(x => x.user, map =>
            {
                map.Column("UserId");
                map.NotNullable(false);
            });

        }
    }
}
